// for leftsider tab
function leftsidertab(n,k){
for(var i=1;i<=n;i++){
	if(i!=k){
	document.getElementById("lefttab_"+i).className="lefttabout";
	document.getElementById("content_"+i).style.display="none";
	}
	else{
	document.getElementById("lefttab_"+i).className="lefttabon";
	document.getElementById("content_"+i).style.display="";
	}
}
}

// for leftsidermenuclick
var old_menu = ''; 
var old_cell = ''; 
function menuclick( submenu ,cellbar) 
{ 
if( old_menu != submenu ){ 
if( old_menu !='' ){ 
old_menu.style.display = 'none'; 
old_cell.src= '../images/down.png'; 
} 
submenu.style.display = 'block'; 
cellbar.src = '../images/up.png'; 
old_menu = submenu; 
old_cell = cellbar; 

}else{ 
submenu.style.display = 'none'; 
cellbar.src= '../images/down.png'; 
old_menu = ''; 
old_cell = ''; 
} 
} 

function nav(n,k){
for(var i=1;i<=n;i++){
	if(i!=k){
	document.getElementById("tab_"+i).className="tabon";
	}
	else{
	document.getElementById("tab_"+i).className="tabout";
	}
}
}
//tab
function switchTab(tabpage,tabid){
        var oItem = document.getElementById(tabpage);   
	for(var i=0;i<oItem.children.length;i++){
		var x = oItem.children(i);	
		x.className = "";
		var y = x.getElementsByTagName('a');
		y[0].style.color="#000";
	}	
	document.getElementById(tabid).className = "Selected";
	var dvs=document.getElementById("cnt").getElementsByTagName("div");
	for (var i=0;i<dvs.length;i++){
	  if (dvs[i].id==('d'+tabid))
	    dvs[i].style.display='block';
	  else
  	  dvs[i].style.display='none';
	}
}